<template>
    <van-nav-bar
        class="my-bar"
        fixed
        safe-area-inset-top
        :placeholder="placeholder"
    >
        <template #left>
            <slot name="left"> </slot>
        </template>
        <template #title>
            <slot name="title"> </slot>
        </template>
        <template #right>
            <slot name="right"> </slot>
        </template>
    </van-nav-bar>
</template>

<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
    props: ["title", "placeholder"],
    setup() {},
});
</script>

<style lang="scss" scoped>
.my-bar {
    height: 50px !important;
    // line-height: 50px;
    background: transparent;
    :deep .van-nav-bar--fixed {
        height: 50px;
    }
}
:deep .van-nav-bar__content {
    height: 100%;
    background: transparent;
    .van-nav-bar__title {
        flex: 1;
        max-width: 70%;
        padding: 9px 0;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    i {
        font-size: 20px;
    }
    .van-nav-bar__right {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}
</style>
